package com.huiyeji.idempotent;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zhaoduo
 */
public class ParamContext {

    private final Map<String,Object> paramMap = new HashMap<String, Object>();

    public ParamContext(Object[] args, String[] parameterNames){
        for (int i = 0; i < parameterNames.length; i++) {
            paramMap.put(parameterNames[i], args[i]);
        }
    }

    public Object getParam(String name){
        return paramMap.get(name);
    }
}
